package org.dromara.genealogy.domain.vo;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.dromara.common.translation.annotation.Translation;
import org.dromara.common.translation.constant.TransConstant;
import org.dromara.genealogy.domain.GeNameDraft;
import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
import cn.idev.excel.annotation.ExcelProperty;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;
import java.util.List;


/**
 * 世代名称视图对象 ge_name_draft
 *
 * @author qianjm
 * @date 2025-10-23
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = GeNameDraft.class)
public class GeNameDraftVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ExcelProperty(value = "主键id")
    private Long id;

    /**
     * 世代名称
     */
    @ExcelProperty(value = "世代名称")
    private Integer geneName;

    /**
     * 姓氏
     */
    @ExcelProperty(value = "姓氏")
    private String name;

    /**
     * 谱名
     */
    @ExcelProperty(value = "谱名")
    private String lastName;

    /**
     * 常用名
     */
    @ExcelProperty(value = "常用名")
    private String commonName;

    /**
     * 别名
     */
    @ExcelProperty(value = "别名")
    private String alias;

    /**
     * 说明
     */
    @ExcelProperty(value = "说明")
    private String mark;

    /**
     * 父节点
     */
    @ExcelProperty(value = "父节点")
    private Long parentId;

    /**
     * 关系(生、抚子等)
     */
    @ExcelProperty(value = "关系(生、抚子等)")
    private String relation;

    /**
     * 父母名称
     */
    @ExcelProperty(value = "父母名称")
    private String parentName;

    /**
     * 排行
     */
    @ExcelProperty(value = "排行")
    private String rankNo;

    /**
     * 学校
     */
    @ExcelProperty(value = "学校")
    private String school;

    /**
     * 专业
     */
    @ExcelProperty(value = "专业")
    private String professional;

    /**
     * 学历
     */
    @ExcelProperty(value = "学历")
    private String degree;

    /**
     * 性别
     */
    @ExcelProperty(value = "性别")
    private String gender;

    /**
     * 职务
     */
    @ExcelProperty(value = "职务")
    private String duties;

    /**
     * 头衔
     */
    @ExcelProperty(value = "头衔")
    private String title;

    /**
     * 出生日期
     */
    @ExcelProperty(value = "出生日期")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date birthday;

    /**
     * 状态(去世/在世)
     */
    @ExcelProperty(value = "状态(去世/在世)")
    private String status;

    /**
     * 头像
     */
    private String avatar;

    /**
     * 头像
     */
    @Translation(type = TransConstant.OSS_ID_TO_URL,mapper = "avatar")
    private String avatarUrl;

    /**
     * 死亡时间
     */
    @ExcelProperty(value = "死亡时间")
    @DateTimeFormat(pattern = "yyyy-MM-dd")
    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date deadTime;

    /**
     * 葬地
     */
    @ExcelProperty(value = "葬地")
    private String burialSite;

    /**
     * 配偶关系
     */
    @ExcelProperty(value = "配偶关系")
    private String personType;

    /**
     * 配偶主键id
     */
    @ExcelProperty(value = "配偶主键id")
    private Long otherId;

    /**
     * 族谱id
     */
    @ExcelProperty(value = "族谱id")
    private Long geId;



    /**
     * 学历状态(education_status)
     */
    @ExcelProperty(value = "学历状态(education_status)")
    private String degreeStatus;

    /**
     * 住址
     */
    private String address;

    /**女儿数量*/
    private Integer daughterNum;

    /**儿子数量*/
    private Integer sonNum;



    /**
     * 孩子数据
     */
    private List<GeNameDraftVo> childrenList;

    /**
     * 妻子数据
     */
    private List<GeNameDraftVo> wifeList;


}
